package com.imooc.security.price;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

/**
 * @ClassName OrderController
 * @Description TODO 订单服务
 * @Author wushaopei
 * @Date 2021/5/2 20:39
 * @Version 1.0
 */
@RestController
@RequestMapping("/prices")
@Slf4j
public class PriceController {

    @GetMapping("/{id}")
    public PriceInfo create(@PathVariable Long id){
        log.info("productId is {}" ,id);
        PriceInfo info = new PriceInfo();
        info.setId(id);
        info.setPrice(new BigDecimal(100));
        return info;
    }
}
